package com.itheima.common.config;

import com.itheima.common.safe.AliyunSafeTemplate;
import com.itheima.common.safe.GreenProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
@EnableConfigurationProperties(GreenProperties.class)
public class AliyunSafeConfiguration {

    private GreenProperties greenProperties;

    @Bean
    public AliyunSafeTemplate getAliyunSafeTemplate() {
        return new AliyunSafeTemplate(greenProperties);
    }
}
